<template>
    <div>
        姓名: <input v-model="user.name" type="text" /> 年龄:
    <input v-model="user.age" type="text" />
    </div>
</template>

<script>
export default {
    name: 'VuBaseApp',

    data() {
        return {
            user:{
                name:"",
                age:"",
            }
        };
    },
    watch:{
        user:{
            deep:true,
            handler(newVal,oldVal){
                console.log(newVal.name,newVal.age);
            }
        }
    },

    mounted() {
        
    },

    methods: {
        
    },
};
</script>

<style lang="scss" scoped>

</style>